The RichTextEditor Component > Using the RichTextEditor component > Creating an application with the RichTextEditor component |
Creating an application with the RichTextEditor component
The following procedure describes how to create a simple application with the RichTextEditor component. In the procedure, you enter simple ActionScript code to affect the component. For a more complex example, see Examples for the RichTextEditor component.
To create a simple application using the RichTextEditor component:
1 |
Open Flash MX |
2 |
Open Components panel (Window > Components) |
3 |
Selct "Flash UI RichTextEditor" from the Components panel menu |
4 |
Drag an instance of the "RichTextEditor" component to the stage |
5 |
Select "Flash UI Components" from the Components panel menu |
6 |
Drag an instance of the "PushButton" component to the stage |
7 |
A dialog may appear asking to overwrite some of the components, select "no" |
8 |
Select the PushButton component on the stage |
9 |
In the Properties Inspector, set it's Label parameter to "submit" and it's Change Handler parameter to "onSubmit" |
10 |
Select the RichTextEditor component on the stage |
11 |
In the Properties Inspector give it an instance name of "myRichTextEditor" |
12 |
Add a new layer to your timeline, and name it "actions" |
13 |
Select the first frame in your new layer |
14 |
In the Actions panel, include the following ActionScript code: |
onSubmit = function(){
var result = myRichTextEditor.getRichText();
trace(result);
}
|
|
15 |
Save, publish, and test the movie. |